package work

import "time"

type WorkOrderStruct struct {
	Id            int       `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key"`
	AdminId       int       `json:"admin_id" gorm:"type:int(11); COMMENT:'管理员id'"`
	CarNumber     string    `json:"car_number" gorm:"type:varchar(20); COMMENT:'车牌号'"`
	ParkName      string    `json:"park_name" gorm:"type:varchar(20); COMMENT:'停车场名称'"`
	Question      string    `json:"question" gorm:"type:text; COMMENT:'问题'"`
	Image         string    `json:"image" gorm:"type:text; COMMENT:'图片'"`
	CreatedAt     time.Time `json:"created_at" gorm:"type:datetime"`
	UpdatedAt     time.Time `json:"updated_at" gorm:"type:datetime"`
	HandleAt      time.Time `json:"handle_at" gorm:"type:datetime; COMMENT:'处理时间'"`
	Answer        string    `json:"answer" gorm:"type:text"`
	AnswerAdminId int       `json:"answer_admin_id" gorm:"type:int(11); COMMENT:'回复管理员id'"`
	Remark        string    `json:"remark" gorm:"type:varchar(255); COMMENT:'备注'"`
	Status        int       `json:"status" gorm:"type:tinyint(1); COMMENT:'状态'"`
}

func (c WorkOrderStruct) TableName() string {
	return "work_order"
}
